package com.neu.elm.mapper;

import com.neu.elm.po.Food;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:csw
 * @Date: 11:25 2020/9/15
 */
@Mapper
public interface FoodMapper {

    //按照foodId查询 在cartMapper.xml被一对一引用
    @Select("select * from food where foodId=#{foodId}")
    public Food getFoodById(Integer foodId);

    //按照BusinessId查询food集合
    @Select("select * from food where businessId=#{businessId} order by foodId")
    public List<Food> listFoodByBusinessId(Integer businessId);


}
